package com.deram.ctin.serv.business.api;

import com.deram.ctin.common.bean.PageResult;
import com.deram.ctin.serv.business.entity.BaseUpdateInfo;
import com.deram.ctin.serv.business.entity.BusinessCopyright;
import com.deram.ctin.serv.business.entity.BusinessJudgement;
import com.deram.ctin.serv.business.filter.BusinessCopyrightFilter;
import com.deram.ctin.serv.business.filter.BusinessJudgementFilter;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @Author: jtt
 * @Description:
 * @Date: 2017/9/13 15:41
 * @version: V1.0
 */
@FeignClient("serv-business")
@RequestMapping("/businessCopyrightApi")
public interface BusinessCopyrightApi {

    @PostMapping("/list")
    List<BusinessCopyright> list(@RequestBody BusinessCopyrightFilter filter);

    @PostMapping("/save")
    BusinessCopyright save(@RequestBody BusinessCopyright param);

    @PostMapping("/delete")
    void delete(@RequestParam("id") Long id);

    @PostMapping("/saveList")
    void saveList(@RequestBody BaseUpdateInfo<BusinessCopyright> updateInfo);

    @PostMapping("/search")
    PageResult<BusinessCopyright> search(@RequestBody BusinessCopyrightFilter filter, @RequestParam("pageNo") Integer pageNo, @RequestParam("pageSize") Integer pageSize);
}
